import axios from "../index.js";
// 应急处置-响应研判
// 新增
export const saveAdd = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/save",
    method: "post",
    data: data
  });
};
// 提交
export const handleSubmitApi = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/submit",
    method: "post",
    data: data
  });
};
// 删除
export const deleteById = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/deleteById",
    method: "post",
    data: data
  });
};
// 批量删除
export const deleteByIds = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/deleteByIds",
    method: "post",
    data: data
  });
};
// 分页查询
export const listPage = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/listPage",
    method: "post",
    data: data
  });
};
// 详情
export const getById = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/getById",
    method: "get",
    data: data
  });
};
// 无需处理
// export const updStateById = (data) => {
//   return axios.request({
//     url: "/warning/warningInfo/updStateById",
//     method: "post",
//     data: data
//   })
// }
// 修改
export const updById = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/updById",
    method: "post",
    data: data
  });
};

// 获取应急事件来源（未研判）
export const getEmergencyEventsOptionsApi = () => {
  return axios.request({
    url: "/emergency/emergencyJudge/getReportEvent",
    method: "get"
  });
};

// 获取应急事件详细数据
export const getEmergencyEventsDataApi = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/getRecentEvent",
    method: "get",
    data
  });
};

// 获取研判标准
export const getJudgeStandardApi = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/getJudgeStandard",
    method: "get",
    data
  });
};

// 审批
export const approveApi = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/approve",
    method: "post",
    data
  });
};

// 创建响应命令
export const createOrderApi = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/createOrder",
    method: "get",
    data
  });
};

// 根据事件获取灾情信息
export const getJudgeInfoListApi = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/getJudgeInfoList",
    method: "get",
    data
  });
};

// 获取编辑时应急下拉数据
export const getEditSubmitNoJudgeEventApi = (data) => {
  return axios.request({
    url: "/emergency/emergencyJudge/getEditSubmitNoJudgeEvent",
    method: "get",
    data
  });
};

// 获取首页研判单事件数据
export const getJudgeEventApi = (data) => {
  return axios.request({
    url: "/emergency/judgeHomePage/getJudgeEvent",
    method: "get",
    data
  });
};
// 获取首页 响应研判  地图接口
export const getAlreadyIssue = (data) => {
  return axios.request({
    url: "/emergency/judgeHomePage/getAlreadyIssue",
    method: "get",
    data
  });
};

// 首页点击 灾情弹窗
export const getInfoDetailList = (data) => {
  return axios.request({
    url: "/emergency/judgeHomePage/getJudgeHomePageInfoDetailList",
    method: "get",
    data
  });
};

// 列表页 新增 研判人
export const getJudgeUser = (data) => {
  return axios.request({
    // url: "/brac/orgAccount/getAccountOrgInfoList",
    url: "/system/account/getAccountOrgInfoList",
    method: "get",
    data
  });
};
